package com.zzyl.mapper;
import com.github.pagehelper.Page;
import com.zzyl.dto.AlertRuleDto;
import com.zzyl.entity.AlertData;
import com.zzyl.entity.AlertRule;
import com.zzyl.vo.AlertRuleVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface AlertRuleMapper {
    void insert(AlertRule alertRule);

    Page<AlertRuleVo> getPage(String alertRuleNmae, String functionName, String productKey);

    AlertRuleVo getRead(Integer id);

    void update(AlertRuleDto alertRuleDto);

    void delete(Integer id);

    void updateStatus(Integer id, Integer status);

    List<AlertRuleVo> getAlertRuleJob(String functionId, String iotId, String productKey);

    List<Long> searchForUsers(String deviceMaintainerRole);

    List<Long> searchByDevice(String iotId);

    List<Long> findACaregiver(String iotId);

    void batchInsertion(List<AlertData> list);
}
